package com.qf.j2105.controller;

import com.qf.j2105.api.LoginServiceApi;
import com.qf.j2105.vo.ActionResult;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class LoginController {

    private LoginServiceApi loginServiceApi;

    @PostMapping("/login")
    @CrossOrigin
    public ActionResult login(String utel, String upass) {
        System.out.println("utel = " + utel);
        ActionResult login = loginServiceApi.login(utel, upass);
        return login;
    }

    @GetMapping("/admin/sss")
    @CrossOrigin
    public String ll(){
        System.out.println("1111");
        return "adadada";
    }
}
